package starblaze 
{
  import starblaze.error.MissingVariableError;
	
  public final class VariableLookup 
  {
    
    internal var m_lut:Vector.<Variable> = null;
    
    public function getIndex(variable:Variable):uint
    {
      for (var i:uint = 0; i < m_lut.length; ++i)
        if (m_lut[i].name == variable.name)
          return i;
          
      throw new MissingVariableError(variable);
      return -1;
    }
    
  }

}